package com.yys.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yys.pojo.Result;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;

/**
 * @Description: 练习springfoxController
 * @author <a href="mailto:93253@ycgwl.com">yeyunsong</a>
 * @date 2017年7月3日 上午11:03:37
 * @version 无
 *
 */
@Api(value = "testController")
@Controller
@RequestMapping("/test")
public class testController {

	@ApiOperation(httpMethod = "GET", value = "testSpringfox", produces = "application/json")
	@ApiResponse(code = 200, message = "success", response = Result.class)
	@RequestMapping(value = "/test", method = RequestMethod.GET, produces = "application/json")
	public @ResponseBody Result test(@ApiParam(name = "testId", required = true, value = "测试Id") String testId,
			HttpServletRequest request) {
		Result result = new Result();
		result.setCode(200);
		result.setData("OK");
		result.setResultInfo("testOK");
		return result;
	}
}
